#include "config.h"

#define BEEP  (1 << 7)  //18 bit set 1
//const uint32 led2 = (1 << 19);

void delayns(uint32 time) {
	uint32 i = 0;
	for (; time > 0; time--) {
		for (i = 0; i < 50000; i++);
	}
}

int main(int argc, char **argv) {
	//uint32 i = 0;
	PINSEL0 = 0x00000000;
	//PINSEL1 = 0x00000001;  //open GPIO
	IO0DIR = BEEP;			//set p1.18 output
	//i = IO1SET;
	

	while (1) {
		IO0SET = BEEP;
		delayns(50);
		IO0CLR = BEEP;			//cry
		//IO1CLR = led2;
		delayns(50);
	}
	
	return 0;
}